class Scene1 extends Scene{
	public constructor() {
		super();
	}

	protected onadd(){
		let bg: egret.Bitmap = new egret.Bitmap();
			bg.texture = RES.getRes('1_jpg');
		//	bg.fillMode=egret.BitmapFillMode.SCALE
			this.addChild(bg);
		
		let kaishi = this.shezhi("开始游戏",this.stage.stageWidth/2-100,this.stage.stageHeight - 200,200,100,0x000000,true,this.ontap);
		this.addChild(kaishi);

		let shezhi = this.shezhi("设置",this.stage.stageWidth-100,0,100,50,0x000000,true,this.onshezhi);
		this.addChild(shezhi);
		
		// this.touchEnabled = true;
		// this.stage.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onclick,this);
	}
	protected onRemove(){

	}
	private ontap(){
		let s2:Scene2 = new Scene2();
		SceneManager.getInstance().changeScene(s2);
	}
	private onshezhi(){
		let sz:Shezhi = new Shezhi();
		sz.x = this.stage.stageWidth/2 - sz.width/2;
		sz.y = this.stage.stageHeight/2 - sz.height/2-100;
		SceneManager.getInstance().pushScene(sz);
	}
	// private onclick(){
	// 	SoundManager.Instance.bom();
	// }
}